package cn.heapstack.jpa.entityrelationships.domain;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;

@Entity(name="EntityRelationships_Credit_Card")
public class CreditCard {
	private int id;
	private Date expiration;
	private String number;
	private String name;
	private String orgrnization;
	private Customer customer;
	
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public Date getExpiration() {
		return expiration;
	}
	public void setExpiration(Date expiration) {
		this.expiration = expiration;
	}
	public String getNumber() {
		return number;
	}
	public void setNumber(String number) {
		this.number = number;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getOrgrnization() {
		return orgrnization;
	}
	public void setOrgrnization(String orgrnization) {
		this.orgrnization = orgrnization;
	}
	
	@OneToOne(mappedBy="creditCard")
	public Customer getCustomer() {
		return customer;
	}
	public void setCustomer(Customer customer) {
		this.customer = customer;
	}


}
